export function getMessageList (options) {
  return window.fetch({
    method: 'POST',
    url: '/message/list',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10
    }
  })
}

export function setMessageState (options, ids) {
  return window.fetch({
    method: 'POST',
    url: '/message/handling',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      ids: ids || null
    }
  })
}

export function receivesMessage () {
  return window.fetch({
    method: 'POST',
    url: '/message/list/unread'
  })
}

export function messageCount () {
  return window.fetch({
    method: 'POST',
    url: '/message/unread/count'
  })
}
